<html>

	<head>
		<meta charset="UTF-8">
		<title>ajax跨域</title>
		<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

		<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
		<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
		<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$("#b01").click(function() {
					$.ajax({
						type: "get",
						async: true,
						dataType: "jsonp",
						processData: false,
						url: '',
						processData: false,
						success: function(data) {
							alert(data);
						},
					});

				});
				$("#b02").click(function() {
					$.ajax({
						type: "get",
						async: true,
						dataType: "json",
						url: '',
						processData: false,
						success: function(data) {
							console.log("json过于复杂请自行解析" + JSON.stringify(data));
						},
					});
				});
			});
		</script>
	</head>

	<body>

		<div id="myDiv">
			<h2>ajax返回数据model  两种方式都是可以的</h2></div>
		<button id="b01" type="button">测试一</button>
		<button id="b02" type="button">测试二</button>
	</body>

</html>